package com.wish.g04.financing.controller;

import com.wish.g04.base.entity.CwPayOrderDetail;
import com.wish.g04.financing.dto.PayOrderDTO;
import com.wish.g04.common.core.web.controller.BaseController;
import com.wish.g04.common.core.web.page.TableDataInfo;
import com.wish.g04.financing.service.PayOrderDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 交易流水
 * @author tianyandong
 */
@RestController
@RequestMapping("/order")
public class DealWaterController extends BaseController {

    @Autowired
    private PayOrderDetailService payOrderDetailService;

    /**
     * 查询所有流水
     * @param cwPayOrderDTO
     * @return
     */
    @GetMapping("getPayOrderList")
    public TableDataInfo getPayOrderList(PayOrderDTO cwPayOrderDTO) {
        startPage();
        List<CwPayOrderDetail> cwPayOrderDetailList = payOrderDetailService.getPayOrderDetailList(cwPayOrderDTO);
        return getDataTable(cwPayOrderDetailList);
    }
}
